FROM golang:alpine3.18 as build
ENV GOPROXY=https://goproxy.cn
ENV GO111MODULE=on
COPY ./code /code
WORKDIR /code

RUN GOOS=linux GOARCH=amd64  go build -o webhook

#
FROM alpine:3.13

COPY --from=build /code/webhook /webhook
EXPOSE 5001
CMD /webhook